import {
	createRouter,
	createWebHistory
} from 'vue-router'
import Login from '../views/Login.vue'
//员工界面
import Home_employee from '../views/Home_employee.vue'
import List_employee from '../views/Sys/List_employee.vue'
import List_employee_confirm from '../views/Sys/List_employee_confirm.vue'
//领导界面
import Home_manager from '../views/Home_manager.vue'
import List_manager_problem from '../views/Sys/List_manager_problem.vue'
import List_manager_fund from '../views/Sys/List_manager_fund.vue'
import List_manager_repair from '../views/Sys/List_manager_repair.vue'
import List_manager_query from '../views/Sys/List_manager_query.vue'
//维修界面
import Home_maintenance from '../views/Home_maintenance.vue'
import List_maintenance_judge from '../views/Sys/List_maintenance_judge.vue'
import List_maintenance_fund from '../views/Sys/List_maintenance_fund.vue'
import List_maintenance_completed from '../views/Sys/List_maintenance_completed.vue'
//图片详情展示
import List_picture from '../views/Sys/List_picture.vue'


const routes = [
	{
		path: '/',
		redirect: '/login'
	},
	{
		path: '/login',
		name: 'Login',
		component: Login
	},
	//员工路径
	{
		path: '/home_employee',
		name: 'Home_employee',
		component: Home_employee,
		redirect: '/home_employee/list_employee',
		children: [{
			path: '/home_employee/list_employee',
			component: List_employee
		}, {
			path: '/home_employee/list_employee_confirm',
			component: List_employee_confirm
		}, {
			path: '/home_employee/list_picture',
			component: List_picture
		}]
	},
	//领导路径
	{
		path: '/home_manager',
		name: 'Home_manager',
		component: Home_manager,
		redirect: '/home_manager/list_manager_problem',
		children: [{
			path: '/home_manager/list_manager_problem',
			component: List_manager_problem
		}, {
			path: '/home_manager/list_manager_fund',
			component: List_manager_fund
		}, {
			path: '/home_manager/list_manager_query',
			component: List_manager_query
		},{
			path: '/home_manager/list_manager_repair',
			component: List_manager_repair
		}, {
			path: '/home_manager/list_picture',
			component: List_picture
		}]
	},
	//维修路径
	{
		path: '/home_maintenance',
		name: 'Home_maintenance',
		component: Home_maintenance,
		redirect: '/home_maintenance/list_maintenance_judge',
		children: [{
			path: '/home_maintenance/list_maintenance_judge',
			component: List_maintenance_judge
		},{
			path: '/home_maintenance/list_maintenance_fund',
			component: List_maintenance_fund
		},{
			path: '/home_maintenance/list_maintenance_completed',
			component: List_maintenance_completed
		}, {
			path: '/home_maintenance/list_picture',
			component: List_picture
		}]
	}
]

const router = createRouter({
	history: createWebHistory(),
	routes
})

export default router
